package com.springclouddemo.eurekaclientconsumerjava.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 何昌杰
 */
@Configuration
public class RibbonConfiguration {
    /**
     * 修改负载均衡规则为随机
     */
    @Bean
    public IRule ribbonRule(){
        return new RandomRule();
    }
}
